/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.spoxcy.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * A Tester for testing databse connectivity
 *
 * @author Denis.Duan
 * @date Apr 20, 2009
 */
public class DBTester extends DBUtil{

    public Connection getConnection() {
        Connection c = null;
        try {

            Class.forName("com.mysql.jdbc.Driver");
            String url = "jdbc:mysql://localhost:3306/spoxcy";
            c = DriverManager.getConnection(url, "root", "root");

        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return c;
    }

}
